import request from '../utils/request'


// 登录
export const apiLogin = (data) => {
    return request({
        url: '/api/login',
        method: 'post',
        data
    })
}

// 获取用户信息
export const apigetUserInfo = () => {
    return request({
        url: '/api/getUserInfo'
    })
}

// 第三方登录
export const apigiteeLogin = (data) => {
    return request({
        url: '/api/giteeLogin',
        method: 'post',
        data
    })
}

// 获取一级分类
export const apigetClassify = () => {
    return request({
        url: '/api/getClassify',
    })
}

// 获取二级分类
export const apigetClassifyTow = (data) => {
    return request({
        url: '/api/getClassifyTow',
        method: 'post',
        data
    })
}

// 获取列表数据
export const apigetList = (data) => {
    return request({
        url: '/api/getCsdnList',
        method: 'post',
        data
    })
}

// 获取文章类型
export const apigetArticleType = () => {
    return request({
        url: '/api/ArticleType'
    })
}

// 发布文章
export const apiSendArticle = (data) => {
    return request({
        url: '/api/sendArticle',
        method: 'post',
        data
    })
}

// 获取详情
export const apigetDetail = (data) => {
    return request({
        url: '/api/getDetail',
        method: 'post',
        data
    })
}



